#pragma once

#include "include_gl.h"

class GLTexture
{
private:
	GLTexture(GLuint name, GLenum target, GLint internalFormat, GLsizei width, GLsizei height, bool immutable);

public:
	~GLTexture();

	GLuint name;
	GLenum target;
	GLint internalFormat;
	GLsizei width, height;
	GLint minFilter, magFilter;
	GLint wrap;

	bool immutable;

	static GLTexture* newMutable(GLenum target, GLint internalFormat, GLsizei width, GLsizei height=1, GLenum format=GL_RGBA, GLenum type=GL_FLOAT, void *data=NULL);
	static GLTexture* newImmutable(GLenum target, GLint internalFormat, GLsizei width, GLsizei height=1, GLenum format=GL_RGBA, GLenum type=GL_FLOAT, void *data=NULL);

	void setFilters(GLint minFilter, GLint magFilter);
	void setWrap(GLint wrap);

	void setContents(GLenum format, GLenum type, void* data);
};